#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool canMakeArithmeticProgression(vector<int>& arr)
    {
        size_t n = arr.size();
        std::sort(arr.begin(), arr.end());

        int gap = arr[1] - arr[0];
        for (size_t i = 1; i < n; ++i)
        {
            if (arr[i] - arr[i - 1] != gap)
            {
                return false;
            }
        }

        return true;
    }
};